package edu.whu.rose.clock.kps.algorithm.blinks2.search3;


public abstract class Cursor31 implements Comparable<Cursor31> {

	protected int block;
	
	protected int pos;
	
	public Cursor31(int block) {
		pos = -1;
		this.block = block;
	}
	
	public int compareTo(Cursor31 x) {
		if (peek() > x.peek()) {
			return 1;
		}
		else if (peek() < x.peek()) {
			return -1;
		}
		else {
			return 0;
		}
	}
	
	public void next() {
		pos++;
	}

	public abstract boolean empty();

	public abstract short getDistance();
	
	public abstract int getNode();
	
	public abstract int getFirst();

	public abstract short peek();

	public int getBlock() {
		return block;
	}
	
}
